


Solves the problem of dipole emission close to a multilayer spherical system with Mie theory
Note that only dipoles outside the largest spheres (at a distance d) are
considered.
The parameters are given as arguments or may also be given in a
structure stMP when called as MulDipSolveMultiSphere(stMP,sPlot,sCoeff)
where stMP contains the parameter fields.
The dipole is assumed to be on the positive z-axis (theta=0)
and aligned in the plane (xOz) (i.e. p_y=0), and at a
distance d from the sphere surface (i.e. at r=a+d).
Note that in this case, we have for the Mie coefficients:
either |m|=1; a,c even in m; b,d odd in m.
or |m|=0; a,c=0; only b and d.
For example, the scattered field is entirely defined by
c_{n,1}, d_{n,1}, and d_{n,0}
(c_{n,-1}=c_{n,1}, d_{n,-1}=-d_{n,1}, c_{n,0}=0 and
all other coefficients are zero).
Results are obtained for a perpendicular and parallel dipole.
Results for the case of a general dipole can then be easily derived from
them.
Parameters:
- nNmax: integer [1 x 1]
number of n in series
- Ca: cell of integer {K x [1 x 1]}
K is number of interfaces (K=1 for single sphere)
radii of spherical interfaces (typically in NANOMETERS)
Ca{K} is outer interface (largest sphere)
- lambda: possibly column vector [L x 1]
wavelengths (typically in NANOMETERS)
- Cepsilon: cell of scalars or column vectors {K+1 x [L x 1]}
epsilon of media (possibly
wavelength-dependent) for k=0 (inside sphere)
to k=K (embedding medium).
- d: integer [1 x 1]
distance from sphere (typically in NANOMETERS)
- nNmaxESA: integer [1 x 1]
number of n in series for evaluation of MTot in
the ESA for n>nNmax
- sPlot: optional (default does nothing)
'plot' will produce a new figure with a plot
of MRad and MTot (Perp and Para cases)
- sCoeff: optional (default does nothing)
'coeff' will return the Mie coefficients for the regular
field expansions(alphakn1, betakn1, betakn0), and for the
irregular field expansions (gammakn1, deltakn1, deltakn0),
and for the non-modified (incident) dipole radiated field
(en1, fn1, fn0)
'suscep' will return the Mie susceptibilities Gamma^k, Delta^k,
A^, and B^k
'both' will return both Mie coefficients and
susceptibilities
Returns: structure stMdip with fields containing the parameters for
future reference and additional fields for the results
- stMdip.nNmax: scalar
- stMdip.nNmaxESA: scalar
- stMdip.a: scalar
- stMdip.lambda: [L x 1]
- stMdip.epsilonM: scalar or [L x 1]
- stMdip.d: scalar
- stMdip.x: [L x 1] x=kM*a
- stMdip.xp: [L x 1] xp=kM*(a+d)
- stMieRes.nK: scalar, number of interfaces
- stMieRes.Ca: cell of {K scalars}
- stMieRes.CepsilonM: cell of {K+1 x (scalar or [L x 1])}
- stMieRes.Cx: cell of {K x [L x 1]}
- stMieRes.Cs: cell of {K x [L x 1]}
- stMdip.MRadPerp: [L x 1] wavelength-dependent radiative decay rate EF
for perpendicular dipole
- stMdip.MTotPerp: [L x 1] wavelength-dependent total decay rate EF
for perpendicular dipole
- stMdip.MRadPara: [L x 1] wavelength-dependent radiative decay rate EF
for parallel dipole
- stMdip.MTotPara: [L x 1] wavelength-dependent total decay rate EF
for parallel dipole
- stMdip.MRadPerpCoeffs [L x nNmax] (if sCoeff='coeffSum'): coeffs of the sums over n
- stMdip.MRadParaCoeffs [L x nNmax] (if sCoeff='coeffSum'): coeffs of the sums over n
- stMdip.MTotPerpCoeffs [L x nNmaxESA] (if sCoeff='coeffSum'): coeffs of the sums over n
- stMdip.MTotParaCoeffs [L x nNmaxESA] (if sCoeff='coeffSum'): coeffs of the sums over n
- stMdip.cn1 (if sCoeff='coeff' or 'both'): [L x nNmax]
- stMdip.dn1 (if sCoeff='coeff' or 'both'): [L x nNmax]
- stMdip.dn0 (if sCoeff='coeff' or 'both'): [L x nNmax]
- stMdip.en1 (if sCoeff='coeff' or 'both'): [L x nNmax]
- stMdip.fn1 (if sCoeff='coeff' or 'both'): [L x nNmax]
- stMdip.fn0 (if sCoeff='coeff' or 'both'): [L x nNmax]
- stMdip.Gamma (if sCoeff='suscep' or 'both'): [L x nNmax]
- stMdip.Delta (if sCoeff='suscep' or 'both'): [L x nNmax]
- stMdip.CstMulGDAB (if sCoeff='suscep' or 'both'): [L x nNmax]
- stMdip.Cgammakn1 (if sCoeff='coeff' or 'both'): cell {K+1 x [L x nNmax]}
- stMdip.Cdeltakn1 (if sCoeff='coeff' or 'both'): cell {K+1 x [L x nNmax]}
- stMdip.Calphakn1 (if sCoeff='coeff' or 'both'): cell {K+1 x [L x nNmax]}
- stMdip.Cbetakn1 (if sCoeff='coeff' or 'both'): cell {K+1 x [L x nNmax]}
This file is part of the SPlaC v1.0 package (copyright 2008)
Check the README file for further information



0001 disp ' '; 0002 global noCheckSum; 0003 if (isempty(noCheckSum) || ~noCheckSum) 0004 disp 'MulDipSolveMultiSphere: Solving dipole Mie for sphere multilayer- CheckSum ON' 0005 else 0006 disp 'MulDipSolveMultiSphere: Solving dipole Mie for sphere multilayer - CheckSum OFF' 0007 end 0008 0009 % rearrange function parameters and define optional parameters 0010 % number of parameters is 1,2, or 3 if called as stMP,sOption,sCoeff 0011 % or 6,7, or 8 if nMax,Ca,lambda,Cepsilon,d,nNmaxESA,sOption,sCoeff 0012 nNbParam=nargin; 0013 if ((nNbParam==1) || (nNbParam==6)) 0014 sPlot='No'; 0015 sCoeff='No'; 0016 end 0017 if ((nNbParam==2) || (nNbParam==7)) 0018 sCoeff='No'; 0019 end 0020 if (nNbParam<4) 0021 nNmax=stMP.nNmax; 0022 Ca=stMP.Ca; 0023 lambda=stMP.lambda; 0024 Cepsilon=stMP.Cepsilon; 0025 d=stMP.d; 0026 nNmaxESA=stMP.nNmaxESA; 0027 end 0028 0029 nK=length(Ca); % number of spherical interfaces K 0030 0031 % Get s_k and x_k for k=1..nK 0032 [Cs,Cx]=MulGetCsCx(lambda,Ca,Cepsilon); 0033 0034 % Calculate xp=k_M (a+d) for dipole position 0035 xp=Cx{nK}/Ca{nK}*(Ca{nK}+d); 0036 0037 if nNmax>0 0038 % Calculate susceptibilities Gamma^k_n, Delta^k_n, A^k_n, and B^k_n 0039 % (defined in Eqs. H.108 and H.117) 0040 % for all n,k and all lambda 0041 CstMulGDAB=MulSuscepGDAB(nNmax,Cs,Cx); 0042 % CstMulGDAB is a cell of K structures, each with the corresponding 0043 % susceptibilities 0044 % Gamma^k_n, Delta^k_n, A^k_n, and B^_n as matrices [L x Nmax] 0045 0046 % Calculate M coeffs for dipole emission 0047 % return coeffs in the sum if sCoeff='coeffSum' 0048 stMdip=DipMcoeff(xp,CstMulGDAB{nK},Ca{nK},d,Cs{nK},nNmaxESA,sCoeff); 0049 else % nNmax=0 means ESA calculation only 0050 stMdip=DipMcoeff(xp,[],Ca{nK},d,Cs{nK},nNmaxESA,'ESAonly'); 0051 sCoeff='No'; % deactive additional options (sCoeff is ignored if nNmax=0) 0052 end 0053 0054 % return results 0055 stMdip.nNmax=nNmax; 0056 stMdip.nNmaxESA=nNmaxESA; 0057 stMdip.a=Ca{nK}; 0058 stMdip.lambda=lambda; 0059 stMdip.epsilonM=Cepsilon{nK+1}; 0060 stMdip.d=d; 0061 stMdip.x=Cx{nK}; 0062 stMdip.xp=xp; 0063 0064 stMdip.nK=nK; 0065 stMdip.Ca=Ca; 0066 stMdip.Cepsilon=Cepsilon; 0067 stMdip.Cx=Cx; 0068 stMdip.Cs=Cs; 0069 0070 if (strcmpi(sCoeff,'suscep') || strcmpi(sCoeff,'both')) 0071 stMdip.Gamma=CstMulGDAB{nK}.Gamma; % for compatibility with single spheres 0072 stMdip.Delta=CstMulGDAB{nK}.Delta; % for compatibility with single spheres 0073 stMdip.CstMulGDAB=CstMulGDAB; 0074 end 0075 0076 if (strcmpi(sCoeff,'coeff') || strcmpi(sCoeff,'both')) 0077 % calculate incident field coefficient an1, bn1, and bn0 0078 stIncEabn1bn0=DipIncEabn1bn0(nNmax,xp); 0079 % results are [L x nNmax] 0080 0081 % calculate Mie coefficients using a downward recurrence (pp. 623,624) 0082 % each cell of coeff corresponds to a given kk=0..nK 0083 stMdip.Cgammakn1=cell(1,nK+1); 0084 stMdip.Cdeltakn1=cell(1,nK+1); 0085 stMdip.Cdeltakn0=cell(1,nK+1); 0086 stMdip.Calphakn1=cell(1,nK+1); 0087 stMdip.Cbetakn1=cell(1,nK+1); 0088 stMdip.Cbetakn0=cell(1,nK+1); 0089 stMdip.Cgammakn1{1}=0; % no scattered field inside the smallest sphere 0090 stMdip.Cdeltakn1{1}=0; 0091 stMdip.Cdeltakn0{1}=0; 0092 % Initialize recurrence 0093 stMdip.Calphakn1{nK+1}=stIncEabn1bn0.an1; 0094 stMdip.Cbetakn1{nK+1}=stIncEabn1bn0.bn1; 0095 stMdip.Cbetakn0{nK+1}=stIncEabn1bn0.bn0; 0096 for kk=nK:-1:1 0097 % Eq. H.108 gamma^k=Gamma^k * alpha^k 0098 stMdip.Cgammakn1{kk+1}=CstMulGDAB{kk}.Gamma .* stMdip.Calphakn1{kk+1}; 0099 stMdip.Cdeltakn1{kk+1}=CstMulGDAB{kk}.Delta .* stMdip.Cbetakn1{kk+1}; 0100 stMdip.Cdeltakn0{kk+1}=CstMulGDAB{kk}.Delta .* stMdip.Cbetakn0{kk+1}; 0101 % Eq. H.117 alpha^{k-1}=A^k alpha^k 0102 stMdip.Calphakn1{kk}=CstMulGDAB{kk}.A .* stMdip.Calphakn1{kk+1}; 0103 stMdip.Cbetakn1{kk}=CstMulGDAB{kk}.B .* stMdip.Cbetakn1{kk+1}; 0104 stMdip.Cbetakn0{kk}=CstMulGDAB{kk}.B .* stMdip.Cbetakn0{kk+1}; 0105 end 0106 stMdip.cn1=stMdip.Cgammakn1{nK+1}; % for compatibility with single spheres 0107 stMdip.dn1=stMdip.Cdeltakn1{nK+1}; % for compatibility with single spheres 0108 stMdip.dn0=stMdip.Cdeltakn0{nK+1}; % for compatibility with single spheres 0109 0110 % coefficient of expansion of incident dipole field in far field 0111 stIncEefn1fn0=DipIncEefn1fn0(nNmax,xp); 0112 stMdip.en1=stIncEefn1fn0.en1; % [L x nNmax] 0113 stMdip.fn1=stIncEefn1fn0.fn1; % [L x nNmax] 0114 stMdip.fn0=stIncEefn1fn0.fn0; % [L x nNmax] 0115 end 0116 0117 % plot if required 0118 if strcmpi(sPlot,'plot') 0119 disp 'Drawing plot...' 0120 DipPlotM(stMdip); 0121 end 0122 0123 disp 'MulDipSolveMultiSphere: done.' 0124 disp ' '